1. Field of the Invention
The present invention relates generally to digital data storage system operation. More specifically, the present invention relates to a method and an apparatus for processing an access command directed to a striped configuration of disks.
2. Description of the Related Art
The operating system (OS) of a computer controls the delivery of read and write commands to a storage medium (e.g., disk drive). In some cases, the OS views an abstraction of the storage medium rather than the physical storage medium. For example, the OS may view a logical drive representing a portion of the physical storage medium. In another example, the OS may view a logical drive representing a combination of different physical storage mediums. A redundant array of independent disks level 0 (RAID 0) represents a system in which a logical drive is defined in a striped configuration across a number of disk drives.
FIG. 1 is an illustration showing an example of how a logical drive is defined across a number of disks in a RAID 0 system, in accordance with the prior art. The example of FIG. 1 includes two disk drives, Disk 0 and Disk 1. The logical drive is defined in a striped configuration across Disk 0 and Disk 1. In the example of FIG. 1, the logical drive is represented by three stripes, Stripes 0-3. Each disk drive in the RAID 0 system contains one or more segments of the logical drive. However, due to the striping configuration, the logical drive segments contained on a single disk drive are not contiguous. For example, Disk 0 of FIG. 1 contains logical drive segments 1, 3, and 5. It should be appreciated that the logical drive segments contained on a single disk drive will become increasingly separated in RAID 0 systems implementing a larger number of disk drives. Therefore, in a RAID 0 system, determining a physical block address on a disk drive that corresponds to a particular logical address can be difficult.
A prior art method for determining a physical block address in a RAID 0 system corresponding to a particular logical address involves division, multiplication, and modulus operations. More specifically, the disk containing the logical address (D0) is calculated by the following formula:D0=(L/S)mod N where L is the logical address of interest, S is the number of blocks in a stripe, and N is the number of disks in the RAID 0 system. Additionally, the physical block address (L0) on the disk containing the logical address is calculated by the following formula:L0=((L/S)/N)*S+(L mod S).With respect to the above formulas for D0 and L0, the operator “/” refers to calculation of a quotient after dividing a numerator by a denominator. The operator “mod” refers to calculation of a remainder after dividing a numerator by a denominator. The operator “*” refers to multiplication of two operands.
The prior art method described above for determining the physical block address corresponding to the logical address in a RAID 0 system involves performing two division operations and two modulo operations. Thus, each time a logical address is to be associated with a physical block address (i.e., each time a read or a write operation is performed) two division operations and two modulo operations must be performed. Hence, the prior art method described above is computationally expensive. Furthermore, due to the division and modulo operations, the prior art method described above is difficult to implement as hardware.
In view of the foregoing, there is a need for a method and apparatus to process access commands directed to a RAID 0 system without requiring division and modulo operations to be performed.